package runing;

import api.Girl;
import proxy.HanMeiMei;
import proxy.HanMeiMeiProxy;
import proxy.WangMeiLiProxy;
import proxy.WangMeiLi;

/**
 * @Author shenhan
 * @Date: 2020/1/16 20:47
 * @Description:
 */
public class MyApp {
    public static void main(String[] args) {
        Girl girl = new WangMeiLi();
        WangMeiLiProxy family = new WangMeiLiProxy(girl);
        Girl father = (Girl) family.getProxyInterface();
        father.date();
        father.watchMovie();
        HanMeiMei girl1 = new HanMeiMei();
        HanMeiMeiProxy hanMeiMeiProxy = new HanMeiMeiProxy(girl1);
        Girl proxyInterface = (Girl) hanMeiMeiProxy.getProxyInterface();
        proxyInterface.watchMovie();
    }
}
